// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /course/category/addCategory */
export async function addCategory(
  body: MediaService.BizCourseCategory,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBoolean>('/course/category/addCategory', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 DELETE /course/category/deleteCategory */
export async function deleteCategory(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.deleteCategoryParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBoolean>('/course/category/deleteCategory', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /course/category/getTreeList */
export async function getTreeList(options?: { [key: string]: any }) {
  return request<MediaService.ResultListCourseCategoryTreeListDto>('/course/category/getTreeList', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /course/category/updateCategory */
export async function updateCategory(
  body: MediaService.BizCourseCategory,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBoolean>('/course/category/updateCategory', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
